<div id="decView"></div>
<div class="layui-card-header"><span class="def-fc left-split"><i class="fa fa-address-card-o"></i>主单信息</span></div>
<div class="layui-card-body">
    <div id="orderView"></div>
    <div id="logistiscsView"></div>
</div>
<div class="layui-card-header"><span class="def-fc left-split"><i class="fa fa-file-text"></i>附件资料</span></div>
<div class="layui-card-body">
    <a href="javascript:" class="file-size" doc-id="" show-file="expOrderAll" edit="false"></a>
</div>
<div class="layui-card-header"><span class="def-fc left-split"><i class="fa fa-list"></i>产品信息</span></div>
<div class="layui-card-body" style="padding: 0px;">
    <div class="layui-tab layui-tab-brief" style="margin: 0px;">
        <ul class="layui-tab-title">
            <li class="layui-this">物料信息</li>
            <li>数量信息</li>
            <li>包装信息</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <table class="layui-hide" id="memberMaterial"></table>
            </div>
            <div class="layui-tab-item">
                <table class="layui-hide" id="memberQty"></table>
            </div>
            <div class="layui-tab-item">
                <table class="layui-hide" id="memberOther"></table>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="orderViewTemp">
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">订单号：</label><label class="fval">{{d.docNo}}</label></div>
        <div class="layui-col-md3"><label class="fkey">订单日期：</label><label class="fval">{{d.orderDate}}</label></div>
        <div class="layui-col-md3"><label class="fkey">客户单号：</label><label class="fval">{{d.clientNo}}</label></div>
        <div class="layui-col-md3"><label class="fkey">客户名称：</label><label class="fval">{{d.customerName}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">报关类型：</label><label class="fval">{{d.declareTypeDesc}}</label></div>
        <div class="layui-col-md3"><label class="fkey">成交方式：</label><label class="fval"><span class="layui-badge">{{d.transactionModeDesc}}</span></label></div>
        <div class="layui-col-md3"><label class="fkey">境内货源地：</label><label class="fval">{{d.districtCodeName}}</label></div>
        <div class="layui-col-md3"><label class="fkey">运抵国(地区)：</label><label class="fval">{{d.cusTradeCountryName}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">贸易国(地区)：</label><label class="fval">{{d.cusTradeNationCodeName}}</label></div>
        <div class="layui-col-md3"><label class="fkey">指运港：</label><label class="fval">{{d.distinatePortName}}</label></div>
        <div class="layui-col-md3"><label class="fkey">运输方式：</label><label class="fval">{{d.cusTrafModeName}}</label></div>
        <div class="layui-col-md3"><label class="fkey">最终目的国：</label><label class="fval">{{d.destinationCountryName}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md3"><label class="fkey">外贸合同卖方：</label><label class="fval">{{d.subjectName}}</label></div>
        <div class="layui-col-md3"><label class="fkey">外贸合买同方：</label><label class="fval">{{d.subjectOverseasName}}</label></div>
        <div class="layui-col-md3"><label class="fkey">币制：</label><label class="fval">{{d.currencyName}}</label></div>
        <div class="layui-col-md3"><label class="fkey">备注：</label><label class="fval">{{d.memo}}</label></div>
    </div>
    <div  class="layui-row">
        <div class="layui-col-md3"><label class="fkey">境外客户：</label><label class="fval">{{removeNull(d.supplierName)}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12"><label class="fkey">协议报价：</label><label class="fval">{{d.agreementDesc}}</label></div>
    </div>
</script>
<script  type="text/html" id="logistiscsViewTemp">
    <div class="layui-row">
        <div class="layui-col-md12">
            <label class="fkey">国内交货方式：</label>
            <label class="fval">
                {{d.deliveryModeName}}
                {{#if(d.deliveryMode=='ExpressDelivery'){ }}
                    快递单号：{{d.deliveryExpressNo}}
                {{#}else if(d.deliveryMode=='TakeDelivery'){ }}
                <span class="layui-badge">{{d.deliveryMethodDesc}}</span>  {{d.takeTime}}
                    【{{d.deliveryCompanyName}}】 {{d.deliveryAddress}} ({{d.deliveryLinkPerson}} {{d.deliveryLinkTel}})
                {{#}}}
            </label>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12"><label class="fkey">交货备注：</label><label class="fval">{{d.deliveryModeMemo}}</label></div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12">
            <label class="fkey">境外交货方式：</label>
            <label class="fval">
                {{d.isCharterCar?'包车':'不包车'}}
                {{#if(d.isCharterCar==true){ }}
                <span class="layui-badge">{{d.deliveryDestinationDesc}}</span>
                    {{#if(d.deliveryDestination=='destination'){ }}
                        【{{d.takeLinkCompany}}】 {{d.takeAddress}} ({{d.takeLinkPerson}} {{d.takeLinkTel}})
                    {{#}}}
                {{#}}}
            </label>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12"><label class="fkey">交货备注：</label><label class="fval">{{d.receivingModeMemo}}</label></div>
    </div>
</script>

<script type="text/html" id="currencyTemp">
    <span class="currency-name"></span>
</script>

<script type="text/html" id="materielStatusTemp">
    <span class="{{d.materielStatusId}}">{{d.materielStatusName}}</span>
</script>

<script type="text/html" id="brandTemp">
    {{#if(d.materielStatusId=='classed' && d.brand != d.decBrand){ }}
    <span class="invalid">{{d.brand}}</span>  <span class="color-red">{{d.decBrand}}</span>
    {{#}else{}}
    {{d.brand}}
    {{#}}}
</script>
<script type="text/html" id="nameTemp">
    {{#if(d.materielStatusId=='classed' && d.name != d.decName){ }}
    <span class="invalid">{{d.name}}</span>  <span class="color-red">{{d.decName}}</span>
    {{#}else{}}
    {{d.name}}
    {{#}}}
</script>
<script type="text/html" id="specTemp">
    {{#if(d.materielStatusId=='classed' && d.spec != d.decSpec){ }}
    <span class="invalid">{{d.spec}}</span>  <span class="color-red">{{d.decSpec}}</span>
    {{#}else{}}
    {{d.spec}}
    {{#}}}
</script>
<script type="text/html" id="decViewTemp">
    <div class="layui-card-header"><span class="def-fc left-split">
         <i class="fa fa-money"></i>申报信息(请确认申报信息)</span>
        {{# if(d.declareEdit == true){}}
        <a href="javascript:" class="layui-btn layui-btn-xs layui-btn-normal" onclick="editDecInfo('{{d.orderId}}')">修改申报信息</a>
        {{#}}}
    </div>
    <div class="layui-card-body">
        <div class="layui-row">
            <div class="layui-col-md4"><label class="fkey">运费：</label><label class="fval">{{removeNull(d.transCosts)}}</label></div>
            <div class="layui-col-md4"><label class="fkey">保费：</label><label class="fval">{{removeNull(d.insuranceCosts)}}</label></div>
            <div class="layui-col-md4"><label class="fkey">杂费：</label><label class="fval">{{removeNull(d.miscCosts)}}</label></div>
        </div>
        {{# if(d.id != null){}}
        <div class="layui-row">
            <div class="layui-row">
                <div class="layui-col-md4"><label class="fkey">申报地海关：</label><label class="fval">{{removeNull(d.customMasterName)}}</label></div>
                <div class="layui-col-md4"><label class="fkey">出境关别：</label><label class="fval">{{removeNull(d.iePortName)}}</label></div>
                <div class="layui-col-md4"><label class="fkey">离境口岸：</label><label class="fval">{{removeNull(d.ciqEntyPortName)}}</label></div>
            </div>
        </div>
        {{#}else{}}
        <div class="layui-row">
            <blockquote class="layui-elem-quote">
                <div class="color-red">
                    未配置出口默认报关模板，请联相关人员配置！！！
                    <a href="javascript:" class="blue-a" onclick="deployDecTemp()">点击此处进行配置</a>
                </div>
            </blockquote>
        </div>
        {{#}}}
    </div>
</script>